LONG style;
};
+/* Use this for hWndInsertAfter (2nd argument to SetWindowPos()) if
+ * SWP_NOZORDER flag is used. Otherwise it's unobvious why a particular
+ * argument is used. Using NULL is misleading, because
+ * NULL is equivalent to HWND_TOP.
+ */
+#define SWP_NOZORDER_SPECIFIED HWND_TOP
+
static void update_style_bits (GdkWindow *window);
static gboolean _gdk_window_get_functions (GdkWindow *window,
GdkWMFunction *functions);
/* Now we know the initial position, move to actually specified position */
if (real_x != x || real_y != y)
{
- API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
+ API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
+ SWP_NOZORDER_SPECIFIED,
real_x, real_y, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP || !focus_on_map)
flags |= SWP_NOACTIVATE;
- SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0, flags);
+ SetWindowPos (GDK_WINDOW_HWND (window),
+ SWP_NOZORDER_SPECIFIED, 0, 0, 0, 0, flags);
return;
}
y = center_on_rect.top + ((center_on_rect.bottom - center_on_rect.top) - (window_rect.bottom - window_rect.top)) / 2;
}
- API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
+ API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
+ SWP_NOZORDER_SPECIFIED,
x, y, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
}
if (x != window_rect.left || y != window_rect.top)
- API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
+ API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
+ SWP_NOZORDER_SPECIFIED,
window_rect.left, window_rect.top, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
{
- SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM,
+ SetWindowPos (GDK_WINDOW_HWND (window), SWP_NOZORDER_SPECIFIED,
0, 0, 0, 0,
SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
}
GDK_WINDOW_HWND (window),
x - _gdk_offset_x, y - _gdk_offset_y));
- API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
+ API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
+ SWP_NOZORDER_SPECIFIED,
x - _gdk_offset_x, y - _gdk_offset_y, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top));
- API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
+ API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
+ SWP_NOZORDER_SPECIFIED,
0, 0,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top));
- API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
+ API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
+ SWP_NOZORDER_SPECIFIED,
x - _gdk_offset_x, y - _gdk_offset_y,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top,
else
{
flags |= SWP_NOZORDER;
- insert_after = NULL;
+ insert_after = SWP_NOZORDER_SPECIFIED;
}
SetWindowPos (GDK_WINDOW_HWND (window), insert_after,
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE) & ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU));
- SetWindowPos (GDK_WINDOW_HWND (window), NULL,
+ SetWindowPos (GDK_WINDOW_HWND (window), SWP_NOZORDER_SPECIFIED,
0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);